package top.songxs.gmall.product.rpc;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.songxs.gmall.common.result.Result;
import top.songxs.gmall.product.rpc.biz.SkuSaleValuesConcatRpcService;
import top.songxs.gmall.product.vo.AttrValuesVo;

import java.util.List;

@RestController
@RequestMapping("api/inner/product")
public class SkuSaleValuesConcatRpcController {

    @Autowired
    private SkuSaleValuesConcatRpcService skuSaleValuesConcatRpcService;
    @GetMapping("getSkuSaleValues/{skuId}")
    public Result<List<AttrValuesVo>> getSkuSaleValues(@PathVariable("skuId") Long skuId){
        List<AttrValuesVo> list = skuSaleValuesConcatRpcService.getSkuSaleValues(skuId);
        return Result.ok(list);
    }
}
